/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package predictor;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JDialog;
import javax.swing.JFrame;

/**
 *
 * @author Administrator
 */
public class ProgressDlg extends JDialog {

    private final PrgPanel m_prgPanel;

    public ProgressDlg(final JFrame parent) {
        super(parent, true);
        m_prgPanel = new PrgPanel();
        this.add(m_prgPanel);
        this.setResizable(false);
        this.setUndecorated(true);
        this.pack();
//        this.addKeyListener(
//                new KeyListener() {
//
//                    public void keyTyped(KeyEvent e) {
//                        return;
//                    }
//
//                    public void keyPressed(KeyEvent e) {
//                        if (KeyEvent.VK_F4 == e.getKeyCode() && e.isControlDown()) {
//                            return;
//                        }
//                    }
//
//                    public void keyReleased(KeyEvent e) {
//                        if (KeyEvent.VK_ESCAPE == e.getKeyCode()) {
//                            ((MainFrame) parent).cancleWorker();
//                            setVisible(false);
//                        }
//
//                    }
//                });
    }

    public void setProgress(int i) {
        m_prgPanel.setProgress(i);
        this.repaint();
        this.validate();
    }
}
